package com.vshop.service.impl;

import com.vshop.entity.comentity.PackageCoverPicture;
import com.vshop.mapper.PackageCoverPictureMapper;
import com.vshop.service.PackageCoverPictureService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)

public class PackageCoverPictureServiceImpl implements PackageCoverPictureService {

    @Resource
    PackageCoverPictureMapper packageCoverPictureMapper;

    @Override

    public String queryPicHomepageByCode(String packageCode, String partnerCode) {
        return packageCoverPictureMapper.queryPicHomepageByCode(packageCode, partnerCode);
    }

    @Override

    public String querypicDetailspageByCode(String packageCode, String partnerCode) {
        return packageCoverPictureMapper.querypicDetailspageByCode(packageCode, partnerCode);
    }

    @Override

    public String querypicDicUrlByCode(String packageCode, String partnerCode) {
        return packageCoverPictureMapper.querypicDicUrlByCode(packageCode, partnerCode);
    }

    @Override

    public String querypicDicUrlENByCode(String packageCode, String partnerCode) {
        return packageCoverPictureMapper.querypicDicUrlENByCode(packageCode, partnerCode);
    }

    @Override

    public int findPictureExistOrNot(String packageCode, String partnerCode) {
        return packageCoverPictureMapper.findPictureExistOrNot(packageCode, partnerCode);
    }

    @Override
    public void storagePicture(PackageCoverPicture picture) {
        packageCoverPictureMapper.storagePicture(picture);
    }

    @Override

    //@Cacheable(value = "pics", key = "#p0+'_'+#p1")

    public List<PackageCoverPicture> queryPictureByCode(String partnerCode, String packageCode) {
        return packageCoverPictureMapper.queryPictureByCode(partnerCode, packageCode);
    }
}
